package org.micode.common.domain;

import java.util.Arrays;
import java.util.List;

/**
 * 分页数据对象
 * @param <T>
 */
public class DataPage<T> {

    /**
     * 分页对象
     */
    private Page page;

    /**
     * 数据列表
     */
    private List<T> list;

    public DataPage() {
    }

    public DataPage(Page page, T[] list) {
        this.page = page;
        this.list = Arrays.asList(list);
    }

    public DataPage(Page page, List<T> list) {
        this.page = page;
        this.list = list;
    }

    public Page getPage() {
        return page;
    }

    public void setPage(Page page) {
        this.page = page;
    }

    public List<T> getList() {
        return list;
    }

    public void setList(List<T> list) {
        this.list = list;
    }

}
